package com.css.dzj.dzjap.modules.lawenforcesuper.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "AP_EXTRACT_LAWER", schema = "DZJAP", catalog = "")
public class ApExtractLawerEntity {
    private String id;
    private Double countryRatio;
    private Double provinceRatio;
    private Double cityRatio;
    private Integer extractNum;
    private String taskId;
    private String result;
    private String remark;
    private Date createTime;
    private String createPerson;
    private Date updateTime;
    private String updatePerson;
    private String delFlag;
    private String linkId;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "COUNTRY_RATIO")
    public Double getCountryRatio() {
        return countryRatio;
    }

    public void setCountryRatio(Double countryRatio) {
        this.countryRatio = countryRatio;
    }

    @Basic
    @Column(name = "PROVINCE_RATIO")
    public Double getProvinceRatio() {
        return provinceRatio;
    }

    public void setProvinceRatio(Double provinceRatio) {
        this.provinceRatio = provinceRatio;
    }

    @Basic
    @Column(name = "CITY_RATIO")
    public Double getCityRatio() {
        return cityRatio;
    }

    public void setCityRatio(Double cityRatio) {
        this.cityRatio = cityRatio;
    }

    @Basic
    @Column(name = "EXTRACT_NUM")
    public Integer getExtractNum() {
        return extractNum;
    }

    public void setExtractNum(Integer extractNum) {
        this.extractNum = extractNum;
    }

    @Basic
    @Column(name = "TASK_ID")
    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @Basic
    @Column(name = "RESULT")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Basic
    @Column(name = "REMARK")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "CREATE_PERSON")
    public String getCreatePerson() {
        return createPerson;
    }

    public void setCreatePerson(String createPerson) {
        this.createPerson = createPerson;
    }

    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Basic
    @Column(name = "UPDATE_TIME")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "UPDATE_PERSON")
    public String getUpdatePerson() {
        return updatePerson;
    }

    public void setUpdatePerson(String updatePerson) {
        this.updatePerson = updatePerson;
    }

    @Basic
    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "LINK_ID")
    public String getLinkId() {
        return linkId;
    }

    public void setLinkId(String linkId) {
        this.linkId = linkId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        ApExtractLawerEntity that = (ApExtractLawerEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(countryRatio, that.countryRatio) &&
                Objects.equals(provinceRatio, that.provinceRatio) &&
                Objects.equals(cityRatio, that.cityRatio) &&
                Objects.equals(extractNum, that.extractNum) &&
                Objects.equals(taskId, that.taskId) &&
                Objects.equals(result, that.result) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createPerson, that.createPerson) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(updatePerson, that.updatePerson) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(linkId, that.linkId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, countryRatio, provinceRatio, cityRatio, extractNum, taskId, result, remark, createTime, createPerson, updateTime, updatePerson, delFlag, linkId);
    }
}
